package com.wnxy.pms.product;


import feign.Logger;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
// 开启Nacos注册中心客户端：服务自动注册与发现
@EnableDiscoveryClient
// 扫描mapper包
@MapperScan("com.wnxy.pms.product.core.mapper")
// 开启Spring集成Redis注解支持
@EnableCaching
// 开启定时任务
@EnableScheduling
// 开启feign注解包扫描
@EnableFeignClients(basePackages = {"com.wnxy.pms.order.client"})
public class ProductApplication {
    public static void main(String[] args) {
        SpringApplication.run(ProductApplication.class,args);
    }

    @Bean
    public Logger.Level loggerLevel(){
        return Logger.Level.FULL;
    }
}
